Create Trade Tracking Entry
GET /api/v1/trade-trackings
Description
Creates a new entry for trade tracking within the system, allowing businesses to monitor the progress of shipments, including details about origins, destinations, shipping dates, and more. This function is essential for managing logistics and ensuring transparency in trade operations.
Headers:
tenantId(required): The tenant ID under which the trade tracking is being created. This header identifies the specific tenant within the system.userId(required): The user ID of the individual creating the trade tracking. This header is used for authentication and to track who is making the changes.countryCode(required): The country code representing the location where the trade is registered or processed. This header helps to localize the trade tracking data.
Request Body (application/json): Required. The body should contain details of the trade's itinerary, delivery status, and associated documents:
{
"deliveredQuantity": 0,
"itenary": [
{
"trackingId": "string",
"origin": "string",
"destination": "string",
"shippingDate": "string",
"trackingProvider": "string",
"deliveryDate": "string",
"deliveryMode": "string",
"finalDestination": false,
"qualityChecked": false,
"labellingDetails": "string",
"docLinks": [
{
"name": "string",
"link": "string"
}
]
}
],
"tradeId": "string",
"userId": "string",
"tenantId": "string",
"countryCode": "string"
}
Responses:
- 201 Created: Indicates that the trade tracking entry has been successfully created. The response typically includes details of the newly created tracking entry.
Example Request:
curl -X POST "http://[base_url]/api/v1/trade-trackings" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d '{
"deliveredQuantity": 100,
"itenary": [
{
"trackingId": "TRACK123",
"origin": "New York, USA",
"destination": "London, UK",
"shippingDate": "2023-04-05",
"trackingProvider": "Global Express",
"deliveryDate": "2023-04-10",
"deliveryMode": "Air",
"finalDestination": true,
"qualityChecked": true,
"labellingDetails": "Handle with care",
"docLinks": [
{
"name": "Shipping Document",
"link": "http://example.com/document.pdf"
}
]
}
],
"tradeId": "TRADE789",
"userId": "USR456",
"tenantId": "TEN123",
"countryCode": "US"
}'
Example Response:
{
"message": "Trade tracking entry created successfully.",
"trackingId": "TRACK123"
}
Error Responses:
- 400 Bad Request: Incorrect or incomplete data for the creation of the trade tracking.
- 403 Forbidden: The user does not have permission to create trade tracking entries.
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/trade-trackings \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!